pp108 : Creating a Condition Template

Creating a Condition Template

This topic describes the procedure to create and modify a condition template.


A condition template represents the draft of a condition, which can be used as it is or can be modified and used. For example, if you have used a particular condition in a rule, and want to use the same condition in another rule, you need not build that condition from scratch. Instead, you can pick a condition template, fine-tune it to your specifications, and use it to build the rule.

You can design conditions as straight-forward expressions, or can design them to accept parameters to form the complete condition.

  1. Select a starting point and click (Condition Template) to open the condition template editor. The Condition Template editor appears.
  2. Select the required <schema fragment> from the Workspace Documents (Explorer) and drag it to the Input Schema pane in the editor. Alternatively, click (Quick Access Menu) on the condition template editor tool bar, click (Insert) on the Quick Access Menu sidebar, and drag the required <schema fragment> to the Input Schema pane in the editor. The Input Schema pane is populated with the required schema fragment.
  3. Build the Condition Expression, using the attributes from the required Business Objects and the functions from the Function Library, in the Expression Grid.
    Note: The expression should be a valid XPath expression. For more information on XPath, refer to the XPath link in the related topics section.
  4. To view the namespaces of the elements, click on the toolbar. A Namespace tab is attached to the Parameter Details appPallette, displaying the prefix and namespace of the elements in the Prefix and Namespace columns.
  5. Click to save the condition template.

    A condition template is created. You can drag these condition templates to the Condition section of the decision table. When you use a condition template for setting the conditions in a decision table, you can select values from the set of parameters that are set in the condition template.

Related tasks

Creating XML Schema Fragments
Building a Decision Table
Creating an Action Template
Generating a Web Service Operation on a Decision Table
Testing Rules Using Rule Test Tool
Building a Condition Expression

Related reference

Rule Actions